import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'
import { Avatar } from 'antd'
import { UserOutlined } from '@ant-design/icons';
import Co from './comments.module.css'
class Comments extends Component {
  render() {
    return (
      <div className={Co.coContain}>
        <Avatar shape="square" size={30} icon={<UserOutlined />} />
        <div className={ Co.info }>
          <div className={ Co.username }>sssss</div>
          <div className={ Co.text }>{this.props.mtext}</div>
          <div className={Co.children}>
            {
              this.props.children.map(el=><Comments {...el}></Comments>)
            }
          </div>
        </div>
      </div>
    )
  }
}
export default withRouter(Comments)